package com.firesrc.mail.search;

import java.util.concurrent.ConcurrentLinkedQueue;

public class SearchMailerFactory {
	private static ConcurrentLinkedQueue<SearchMailStrategy> recordQueue = new ConcurrentLinkedQueue<SearchMailStrategy>();

	public synchronized static SearchMailStrategy getSingleSearchMailer() {
		if (recordQueue.size() <= 0) {
			initQueue();
		}
		SearchMailStrategy poll = recordQueue.poll();
		recordQueue.add(poll);
		return poll;
	}

	private static void initQueue() {
		recordQueue.add(new SearchMailDoNameImpl());
		recordQueue.add(new SearchMailOrayImpl());
		recordQueue.add(new SearchMailNWhisoImpl());
		recordQueue.add(new SearchMail123ChaImpl());
		recordQueue.add(new SearchMailWhois365Impl());
		recordQueue.add(new SearchMailShuXiangImpl());
		//		recordQueue.add(new SearchMailZZAdminImpl());
		recordQueue.add(new SearchMailAosooImpl());
		recordQueue.add(new SearchMailZZBaiKeImpl());
		recordQueue.add(new SearchMailWebMasterHomeImpl());
		recordQueue.add(new SearchMailENameImpl());
		recordQueue.add(new SearchMailHicChinaImpl());

		recordQueue.add(new SearchMailDomainHkltyImpl());
		recordQueue.add(new SearchMailAsiaregisterImpl());

	}
}
